home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7434 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.4 KB

  1. From: jackf@sisna.com
  2. Newsgroups: comp.lang.basic.visual.misc,comp.lang.pascal.delphi.misc,comp.lang.c++
  3. Subject: Re: "SHOULD I DUMP VISUAL BASIC?"
  4. Date: Tue, 20 Feb 1996 16:34:00 GMT
  5. Message-ID: <3129f6ce.1813908@news.sisna.com>
  6. References: <4e9g08$3dp@maureen.teleport.com> <Pine.SUN.3.90.960126125658.2477C-100000@menger.eecs.stevens-tech.edu> <sundial.2191.00464727@primenet.com> <DLvxyq.62w@news.hawaii.edu> <4et3p7$79o@cloud9.net> <823335327.28831@williaj.demon.co.uk> <4f8akg$i3k@druid.borland.com> <W1eMJBAdliGxEwNI@pwhite.demon.co.uk> <31224bc4.6786639@news.netonecom.net> <3126DBB2.5209@magna.com.au>
  7. X-Newsreader: Forte Agent .99d/32.168
  8. NNTP-Posting-Host: dialup1117.sisna.com
  9. Path: news.sisna.com!
  10.  
  11. On Sun, 18 Feb 1996 17:56:34 +1000, John Osborne
  12. <josborne@magna.com.au> wrote:
  13.  
  14. >Pat, et. al....
  15. >The compiled .vs. interpreted debate is partially bogus.  Even in 
  16. >compiled languages, on a PC or a mainframe, as soon as ones code enters 
  17. >a runtime library routine, you are -probably- off into 
  18. >interpretation-land.
  19. >I say -probably- because if your runtime routine has any conditional 
  20. >statements that cause the routine to act differently depending on 
  21. >parameter content (i.e., different logic paths) it is 
  22. >"mini-interpreting".
  23. >
  24. >For example, you call the printf routine in -C-, or a formatted -write- 
  25. >statement in Fortran, VB's Format$ routine, or just about any 
  26. >non-trivial Delphi component, and you are executing an interpreter of 
  27. >that language feature.  Sure, the printf function in the -C- runtime 
  28. >library is compiled, as is the ChartFX component in Delphi, or the 
  29. >read/write routines in a Tandem Cobol program, but the runtime system 
  30. >has to -interpret- your parameters via lots of conditional statements to 
  31. >make sense of your parameters/data and perform the requested action.  
  32. >When using VB or other -statement based- interpreted languages, where 
  33. >most people suffer a performance hit is doing things like writing their 
  34. >own INSTR function -within- VB.  Each p-code statement has to be 
  35. >interpreted via VBRUNxxx.DLL which is far worse than just using the 
  36. >library routine.
  37. >
  38. >Regards, John
  39. >
  40. >viewer wrote:
  41. >> 
  42. >> Pat White <pat@pwhite.demon.co.uk> wrote:
  43. >> 
  44. >> >In nearly 40 years in computing I've never come across anything in any
  45. >> >language definition that prevents compiling. That includes BASIC which
  46. >> >is where this discussion started and p-code. Likewise, they COULD all be
  47. >> >interpreted, only most companies realise compiling is better. Microsoft
  48. >> >is the exception - they tried and failed badly, anyone remember their
  49. >> >Fortran compiler for the PC. When it compiled without falling over you
  50. >> >were amazed. When you ran the results you were sorry!
  51. >> 
  52. >> OTOH, their DOS Basic compilers were fantastic.
  53.  
  54. I believe John is incorrect if he is saying as it appears that any
  55. code which has a decission tree is interpretive.  Interpretive
  56. languages vs compiled has nothing to do with the logic of the code.
  57. The point is that compiled (true compiled not pcode) languages are
  58. already in binary form and so executable directly while each line of
  59. an interpretive language is converted to binary, each time it is
  60. executed.  Four calls to the BASIC print function results in for
  61. "compiles" at run time.  Four calls to printf in C results in one
  62. compile at compile time and no compiles at run time.  The difference
  63. is not trivial in terms of speed of execution.  Note that the printf
  64. function is a bad example as it carries more overhead than most C
  65. functions.
  66. Jack  
  67.